package models

type WxMenuEvent struct {
	ToUserName   string        `xml:"ToUserName"`
	FromUserName string        `xml:"FromUserName"`
	CreateTime   int64         `xml:"CreateTime"`
	MsgType      string        `xml:"MsgType"`
	Event        string        `xml:"Event"` //VIEW
	EventKey     string        `xml:"EventKey"`
	MenuId       string        `xml:"MenuId"`
	ScanCodeInfo *ScanCodeInfo `xml:"ScanCodeInfo"` //专属于扫码
	Content      string        `xml:"Content"`
	Ticket       string        `xml:"Ticket"`
	MsgId        string        `xml:"MsgId"`
}
type ScanCodeInfo struct {
	ScanType   string `xml:"ScanType"`
	ScanResult string `xml:"ScanResult"`
}

type WxAccessToken struct {
	Id          int `orm:"auto"`
	AccessToken string
}

//微信公众平台的参数
type WxBase struct {
	Id             int `orm:"auto"`
	AppID          string
	AppSecret      string
	Token          string
	EncodingAESKey string
}

type AccessTokenResponse struct {
	AccessToken string  `json:"access_token"`
	ExpiresIn   float64 `json:"expires_in"`
}

type AccessTokenErrorResponse struct {
	Errcode float64
	Errmsg  string
}

type WxUserInfo struct {
	AccessToken  string `json:"access_token"`  //网页授权接口调用凭证,注意：此access_token与基础支持的access_token不同
	ExpiresIn    int    `json:"expires_in"`    //access_token接口调用凭证超时时间，单位（秒）
	RefreshToken string `json:"refresh_token"` //用户刷新access_token
	Openid       string `json:"openid"`        //用户唯一标识，请注意，在未关注公众号时，用户访问公众号的网页，也会产生一个用户和公众号唯一的OpenID
	Scope        string `json:"scope"`         //用户授权的作用域，使用逗号（,）分隔
}
type UserStruct struct {
	Openid         string `json:"openid"`          //: "o6_bmjrPTlm6_2sgVt7hMZOPfL2M",
	Nickname       string `json:"nickname"`        // "Band",
	Sex            *int   `json:"sex"`             //: 1,
	Language       string `json:"language"`        //": "zh_CN",
	City           string `json:"city"`            //": "广州",
	Province       string `json:"province"`        //": "广东",
	Country        string `json:"country"`         //": "中国",
	Headimgurl     string `json:"headimgurl"`      //"http://thirdwx.qlogo.cn/mmopen/g3MonUZtNHkdmzicIlibx6iaFqAc56vxLSUfpb6n5WKSYVY0ChQKkiaJSgQ1dZuTOgvLLrhJbERQQ4eMsv84eavHiaiceqxibJxCfHe/0",
	SubscribeTime  *int   `json:"subscribe_time"`  //": 1382694957,
	Unionid        string `json:"unionid"`         //": " o6_bmasdasdsad6_2sgVt7hMZOPfL"
	Remark         string `json:"remark"`          //": "",
	Groupid        *int   `json:"groupid"`         //": 0,
	TagidSist      *[]int `json:"tagid_sist"`      //":[128,2],
	SubscribeScene string `json:"subscribe_scene"` //": "ADD_SCENE_QR_CODE",
	QrScene        *int   `json:"qr_scene"`        //": 98765,
	QrSceneStr     string `json:"qr_scene_str"`    //": ""
}
